<?php if($oProperties): ?>
	<?php foreach($oProperties as $propertyId => $oProperty): ?>
		<div class="property-item<?php echo $oProperty->type ? ' type-'.$oProperty->type : ''; ?>">
			<div class="ptitle"><?php echo $oProperty->title; ?></div>
			<?php if(!empty($oProperty->values)): ?>
				<?php foreach($oProperty->values as $oValue): ?>
					<div class="value-item">
						<label><input type="checkbox" <?php
							echo !empty($aGoodsProperties[$oValue->id]) && isset($aGoodsProperties[$oValue->id][$oValue->property_id]) ? ' checked' : '';
						?> name="property_value[<?php echo $oValue->property_id; ?>][<?php echo $oValue->id; ?>]" value="1" <?php echo !empty($aGoodsProperties[$oValue->id][$oValue->property_id]) && $aGoodsProperties[$oValue->id][$oValue->property_id] !== true ? ' rel="'. $aGoodsProperties[$oValue->id][$oValue->property_id] .'"' : ''; ?>> <?php echo $oValue->value; ?></label>
					</div>
				<?php endforeach; ?>
			<?php endif; ?>
		</div>
	<?php endforeach; ?>
<?php endif; ?>